<include target="_header.html" />
<include cond="$oDocument->isExists()" target="_read.html" />
<p cond="!$document_list && !$notice_list" class="no_ducument">{$lang->no_documents}</p>
<table rules=all summary="List of Articles" id="board_list" class="board_list" cond="$document_list || $notice_list">
	<thead>
		<!-- LIST HEADER -->
		<tr>
			<block loop="$list_config=>$key,$val">
			<th scope="col" cond="$val->type=='no'">{$lang->no}</th>
			<th scope="col" class="title" cond="$val->type=='title'">{$lang->title}</th>
			<th scope="col" cond="$val->type=='nick_name'">{$lang->writer}</th>
			<th scope="col" cond="$val->type=='user_id'">{$lang->user_id}</th>
			<th scope="col" cond="$val->type=='user_name'">{$lang->user_name}</th>
			<th scope="col" cond="$val->type=='regdate'"><a href="{getUrl('sort_index','regdate','order_type',$order_type)}">{$lang->date}</a></th>
			<th scope="col" cond="$val->type=='last_update'"><a href="{getUrl('sort_index','last_update','order_type',$order_type)}">{$lang->last_update}</a></th>
			<th scope="col" cond="$val->type=='last_post'"><a href="{getUrl('sort_index','last_update','order_type',$order_type)}">{$lang->last_post}</a></th>
			<th scope="col" cond="$val->type=='readed_count'"><a href="{getUrl('sort_index','readed_count','order_type',$order_type)}">{$lang->readed_count}</a></th>
			<th scope="col" cond="$val->type=='voted_count'"><a href="{getUrl('sort_index','voted_count','order_type',$order_type)}">{$lang->voted_count}</a></th>
			</block>
		</tr>
		<!-- /LIST HEADER -->
	</thead>
	<tbody>
		<!-- NOTICE -->
		<tr class="notice" loop="$notice_list=>$no,$document">
			<block loop="$list_config=>$key,$val">
			<td class="notice" cond="$val->type=='no'">
				<block cond="$document_srl==$document->document_srl">&raquo;</block>
				<block cond="$document_srl!=$document->document_srl">{$lang->notice}</block>
			</td>
			<td class="title" cond="$val->type=='title'">
				<a href="{getUrl('document_srl',$document->document_srl, 'listStyle', $listStyle, 'cpage','')}">
					{$document->getTitle()}
				</a>
				<a cond="$document->getCommentCount()" href="{getUrl('document_srl', $document->document_srl)}#comment" class="replyNum" title="Replies">
					[{$document->getCommentCount()}]
				</a>
				<a cond="$document->getTrackbackCount()" href="{getUrl('document_srl', $document->document_srl)}#trackback" class="trackbackNum" title="Trackbacks">
					[{$document->getTrackbackCount()}]
				</a>
			</td>
			<td class="author" cond="$val->type=='nick_name'">{$document->getNickName()}</td>
			<td class="author" cond="$val->type=='user_id'">{$document->getUserID()}</td>
			<td class="author" cond="$val->type=='user_name'">{$document->getUserName()}</td>
			<td class="time" cond="$val->type=='regdate'">{$document->getRegdate('Y.m.d')}</td>
			<td class="time" cond="$val->type=='last_update'">{zdate($document->get('last_update'),'Y.m.d')}</td>
			<td class="lastReply" cond="$val->type=='last_post'">
				<block cond="(int)($document->get('comment_count'))>0">
					<a href="{$document->getPermanentUrl()}#comment" title="Last Reply">
						{zdate($document->get('last_update'),'Y.m.d')}
					</a>
					<span cond="$document->get('last_updater')">
						<sub>by</sub>
						{htmlspecialchars($document->get('last_updater'))}
					</span>
				</block>
				<block cond="(int)($document->get('comment_count'))==0">&nbsp;</block>
			</td>
			<td class="readNum" cond="$val->type=='readed_count'">{$document->get('readed_count')>0?$document->get('readed_count'):'0'}</td>
			<td class="voteNum" cond="$val->type=='voted_count'">{$document->get('voted_count')!=0?$document->get('voted_count'):'0'}</td>
			</block>
		</tr>
		<!-- /NOTICE -->
		<!-- LIST -->
		<tr loop="$document_list=>$no,$document">
			<block loop="$list_config=>$key,$val">
			<td class="no" cond="$val->type=='no'">
				<block cond="$document_srl==$document->document_srl">&raquo;</block>
				<block cond="$document_srl!=$document->document_srl">{$no}</block>
			</td>
			<td class="title" cond="$val->type=='title'">
				<a href="{getUrl('document_srl',$document->document_srl, 'listStyle', $listStyle, 'cpage','')}">
					{$document->getTitle()}
				</a>
				<a cond="$document->getCommentCount()" href="{getUrl('document_srl', $document->document_srl)}#comment" class="replyNum" title="Replies">
					[{$document->getCommentCount()}]
				</a>
				<a cond="$document->getTrackbackCount()" href="{getUrl('document_srl', $document->document_srl)}#trackback" class="trackbackNum" title="Trackbacks">
					[{$document->getTrackbackCount()}]
				</a>
			</td>
			<td class="author" cond="$val->type=='nick_name'">{$document->getNickName()}</td>
			<td class="author" cond="$val->type=='user_id'">{$document->getUserID()}</td>
			<td class="author" cond="$val->type=='user_name'">{$document->getUserName()}</td>
			<td class="time" cond="$val->type=='regdate'">{$document->getRegdate('Y.m.d')}</td>
			<td class="time" cond="$val->type=='last_update'">{zdate($document->get('last_update'),'Y.m.d')}</td>
			<td class="lastReply" cond="$val->type=='last_post'">
				<block cond="(int)($document->get('comment_count'))>0">
					<a href="{$document->getPermanentUrl()}#comment" title="Last Reply">
						{zdate($document->get('last_update'),'Y.m.d')}
					</a>
					<span cond="$document->get('last_updater')">
						<sub>by</sub>
						{htmlspecialchars($document->get('last_updater'))}
					</span>
				</block>
				<block cond="(int)($document->get('comment_count'))==0">&nbsp;</block>
			</td>
			<td class="readNum" cond="$val->type=='readed_count'">{$document->get('readed_count')>0?$document->get('readed_count'):'0'}</td>
			<td class="voteNum" cond="$val->type=='voted_count'">{$document->get('voted_count')!=0?$document->get('voted_count'):'0'}</td>
			</block>
		</tr>
		<!-- /LIST -->
	</tbody>
</table>
<div class="list_footer">
    <div class="pagination" cond="$document_list || $notice_list">
        <a href="{getUrl('page','','document_srl','','division',$division,'last_division',$last_division)}" class="prevEnd">{$lang->first_page}</a> 
        <block loop="$page_no=$page_navigation->getNextPage()">
			<strong cond="$page==$page_no">{$page_no}</strong> 
			<a cond="$page!=$page_no" href="{getUrl('page',$page_no,'document_srl','','division',$division,'last_division',$last_division)}">{$page_no}</a>
        </block>
        <a href="{getUrl('page',$page_navigation->last_page,'document_srl','','division',$division,'last_division',$last_division)}" class="nextEnd">{$lang->last_page}</a>
    </div>
<!-- 쓰기버튼 감추기
	<div class="btnArea">
		<a href="{getUrl('act','dispBoardWrite','document_srl','')}" class="btn">{$lang->cmd_write}</a>
	</div>
-->
	<form cond="$grant->view" action="{getUrl()}" method="get" onsubmit="return procFilter(this, search)" id="board_search" class="board_search">
		<input type="hidden" name="vid" value="{$vid}" />
		<input type="hidden" name="mid" value="{$mid}" />
		<input type="hidden" name="category" value="{$category}" />
		<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" accesskey="S" title="{$lang->cmd_search}" class="iText" />
		<select name="search_target">
			<option loop="$search_option=>$key,$val" value="{$key}" selected="selected"|cond="$search_target==$key">{$val}</option>
		</select>
		<input type="submit" onclick="xGetElementById('board_search').submit();return false;" value="{$lang->cmd_search}" class="btn" />
	</form>
</div>
<include target="_footer.html" />
